import { BasicColumn, FormSchema } from "/@/components/Table";
import { render } from "/@/utils/common/renderUtils";

const bcCountFrm = ({text, record}) => {
  if (Number(record.bcCount) > 0) {
    return render.renderColor(text, 'text-red-500')//h('span', { style: {color:'red'} }, text)
  } else {
    return text;
  }
}
export const columns: BasicColumn[] = [
  { title: "单位名称", align: "left", dataIndex: "area_name", width: 260, customRender: bcCountFrm },
  { title: "联系人", align: "center", dataIndex: "lxr", width: 80 },
  { title: "联系电话", align: "center", dataIndex: "lxdh", width: 80 },
  { title: "开户行", align: "center", dataIndex: "khx", width: 100 },
  { title: "银行账号", align: "center", dataIndex: "yhzh", width: 120 },
  { title: "账号姓名", align: "center", dataIndex: "yhhm", width: 120 },
  { title: "录入时间", align: "center", dataIndex: "gxsj", width: 80 },
  { title: "操作人", align: "center", dataIndex: "lrr", width: 60 },
  { title: "排序", align: "center", dataIndex: "sort", width: 50 },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'dataTable',
    label: '表名',
    component: 'Input',
    colProps: { span: 8 },
  },
  {
    field: 'dataId',
    label: '数据ID',
    component: 'Input',
    colProps: { span: 8 },
  },
];
